<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="common::common(title='角色列表')">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" ></meta>
</head>
<script type="text/javascript" th:src="@{/js/basic/rolegroup.js}"></script>
<body>
	<div  id="app">
		<input type="hidden" id="groupId" v-model="groupId" th:value="${groupId}" />
		<input type="hidden" id="isAdmin" v-model="isAdmin" th:value="${isAdmin}" />
			 <el-button-group style="padding-bottom:10px;">
				 <el-button type="primary" size="small" @click="goBack"><i class="el-icon2-arrowleft" ></i> 返回</el-button>
				 <el-button v-if="isAdmin=='1'" type="primary" size="small" @click="addRoleToGroup"><i class="layui-icon layui-icon-group"></i> 增加组内角色</el-button>
				 <el-button v-if="isAdmin=='1'" type="primary" size="small" @click="deleteItem"><i class="layui-icon layui-icon-friends"></i> 移除组内角色</el-button>
			 </el-button-group>
		<el-table  
			    ref="roleGroupDatagrid" 
			    :data="datagrid"
		  tooltip-effect="dark"
		  style="width: 100%;"
		  max-height="300"
		  @row-click="datagridSelect"
		  border
		  highlight-current-row
		  >
		  	<el-table-column type="index" width="30"></el-table-column>
		   	<el-table-column prop="name" label="名称" show-overflow-tooltip> </el-table-column>
		    <el-table-column prop="description" label="描述" show-overflow-tooltip> </el-table-column>
		</el-table>
		<keep-alive>
	  	<role-dialog :visible.sync="roleDialogVisible" v-on:selected="selectRole"></role-dialog>
	  	</keep-alive>
	</div>
	<div th:include="basic/components/roleDialog"></div>
</body>
</html>